package com.company.project.common.pojo;

import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

public class Rest<T> implements Serializable{
	
	private static final long serialVersionUID = 5952861126789622536L;

    @ApiModelProperty(value="状态码：【｛200：操作成功｝，｛400：参数错误｝，｛401：用户认证失败｝，｛403：服务器不处理｝，｛500：服务器错误｝】")
	private String resultCode;
    @ApiModelProperty(value="描述")
	private String resultDesc;
    @ApiModelProperty(value="数据")
	private T result;


    public Rest() {
		super();
	}
    
	public Rest(String resultCode) {
		super();
		this.resultCode = resultCode;
	}

	public Rest(String resultCode, String resultDesc) {
		super();
		this.resultCode = resultCode;
		this.resultDesc = resultDesc;
	}

	public Rest(String resultCode, String resultDesc, T result) {
		super();
		this.resultCode = resultCode;
		this.resultDesc = resultDesc;
		this.result = result;
	}

	public String getResultDesc() {
		if(resultDesc == null) {
			resultDesc = "无回复说明！";
		}
        return resultDesc;
    }

    public void setResultDesc(String resultDesc) {
        this.resultDesc = resultDesc;
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }
}

	
